package com.senven.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.senven.common.entity.Goods;
import com.senven.common.entity.Type;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gjh
 * @since 2022-08-31
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    List<Map> selectByBId(@Param("goodsid") Integer goodsid, @Param("branchid") Integer branchid,@Param("id") String id);

    List<Map> selectbranchid(@Param("branchid") Integer branchid, @Param("name") String name, @Param("typeid") Integer typeid,@Param("id") String id);

    int collect(Integer goodsid, Integer branchid);

    int nocollect(Integer id);

    Integer selectbycollect(Integer goodsid, Integer branchid);

    List<Map> selectid(String id, Goods goodsVo);

    Integer branchid(String id);

    Integer add(Integer branchid, Integer goodsid);

    Integer selectallBYid();

    Integer delgb(Integer branchid, Integer goodsid);

    List<Type> findType();

    Integer type(Integer branchid, Integer goodsid, Integer typeid);

    Integer insertshop(Goods goods);

    Integer updateGoods(Goods goods);

    Integer updateType(@Param("tid") Integer tid,@Param("goods") Goods goods);

    Integer selectType(@Param("goods") Goods goods,@Param("branchid") Integer branchid);

    Integer selectRole(String id);

    List<Map> selectall(Goods goodsVo);

    Integer findRole(String id);

    List<Map> selectType1(Integer branchid);
}
